Use a second-granularity timer.
authorMatthias Clasen <matthiasc@src.gnome.org>
Thu, 31 Jul 2008 22:27:02 +0000 (22:27 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 31 Jul 2008 22:27:02 +0000 (22:27 +0000)
svn path=/trunk/; revision=20922

ChangeLog
modules/input/gtkimcontextmultipress.c

index 19b7f49cc064695b76ce1b3176887bc43749c2d9..50060acf51367a317735a8971f9b034afaf56e7e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-07-31  Matthisa Clasen  <mclasen@redhat.com>
 
+       * modules/input/gtkimcontextmultipress.c: Use a second-granularity
+       timer for automatic commit.
+
        * gtk/gtkclipboard.c (gtk_clipboard_store): Use a second-grandularity
        timer for the store timeout.
 
index 427deed72b2016ba8666cb66de3f1471352152e7..f745075784cf82ab019a046e389d5a7c7d9e0cad 100644 (file)
@@ -378,8 +378,7 @@ vfunc_filter_keypress (GtkIMContext *context, GdkEventKey *event)
       /* Create a timeout that will cause the currently chosen character to be committed,
        * if nothing happens for a certain amount of time:
        */
-      /* g_timeout_add_seconds is only available since glib 2.14: multipress_context->timeout_id = g_timeout_add_seconds(AUTOMATIC_COMPOSE_TIMEOUT, on_timeout, multipress_context); */
-      multipress_context->timeout_id = g_timeout_add (AUTOMATIC_COMPOSE_TIMEOUT * 1000, on_timeout, multipress_context);
+      multipress_context->timeout_id = g_timeout_add_seconds(AUTOMATIC_COMPOSE_TIMEOUT, on_timeout, multipress_context); 
 
       return TRUE; /* TRUE means that the event was handled. */
     }